require 'mongrel_cluster/recipes'

set :use_sudo, false
set :runner, nil
set :application, "bluegoldwebsite"
set :svn_user, ENV['svn_user'] || "VisualBasicIMP"
set :svn_password, Proc.new { Capistrano::CLI.password_prompt('SVN Password: ')}
set :repository,  Proc.new {"--username #{svn_user} " + "--password #{svn_password} " + "https://bluegoldwebsite.googlecode.com/svn/trunk/" }
set :deploy_to, "/home/bgeditor/u/apps/#{application}"
set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
set :user, "bgeditor"

ssh_options[:keys] = %w(/Users/Vbimp/.ssh/id_rsa)
ssh_options[:port] = 2222

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/#{application}"

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion

role :app, "74.54.41.98"
role :web, "74.54.41.98"
role :db,  "74.54.41.98", :primary => true

after "deploy:update_code", :fix_script_perms

task :fix_script_perms do
  run "chmod 755 #{current_path}/script/spin"
end